<?php
/** @var FormController $this */
/** @var Form $model */

$this->pageTitle = Form::label(2);
$this->breadcrumbs = array(
    Yii::t('app', 'Dashboard') => Yii::app()->homeUrl,
	Form::label(2),
);
$this->menu=array(
//    array('label' => Yii::t('noseyModule.app', 'Manage'),'icon' => 'plus', 'url' => array('default/index'), 'active'=>true),
    array('label' => Yii::t('noseyModule.app', 'Create'),'icon' => 'plus','url' => array('form/create')),
);
?>

<div class="widget blue">
    <div class="widget-title">
        <h4><i class="icon-list"></i> <?php echo Yii::t('noseyModule.app', 'Manage') ?> <?php echo Form::label(2) ?></h4>
        <span class="tools">
            <a href="javascript:;" class="icon-chevron-down"></a>
            <!--a href="javascript:;" class="icon-remove"></a-->
        </span>
     </div>
    <div class="widget-body">
        <?php $this->widget('bootstrap.widgets.TbGridView',array(
            'id' => 'form-grid',
            'type' => 'striped condensed',
            'dataProvider' => $model->search(),
            'filter' => $model,
            'columns' => array(
                'name',
                'creation_date',
                array(
                    'class'=>'CButtonColumn',
                    'template'=>'{view} {reporte} {reportefrm}',
                    'buttons'=>array(
                        'view' => array(
                            'label'=>'<button class="btn btn-success"><i class="icon-pencil"></i></button>',
                            'url'=>'Yii::app()->controller->createUrl("form/update", array("id"=>$data->id))',
                            'imageUrl'=>false,
                            'options'=>array('title'=>'Ver'),
                        ),
//                        'delete' => array(
//                            'label'=>'<button class="btn btn-danger"><i class="icon-trash"></i></button>',
//                            'url'=>'Yii::app()->controller->createUrl("form/delete", array("id"=>$data->id))',
//                            'imageUrl'=>false,
//                            'options'=>array('title'=>'Eliminar'),
//                        ),
                        'reporte' => array(
                            'label'=>'<button class="btn btn-warning"><i class="icon-file"></i></button>',
                            'url'=>'Yii::app()->controller->createUrl("form/Report", array("id"=>$data->id))',
                            'imageUrl'=>false,
                            'options'=>array('title'=>'Reporte'),
                        ),
                           'reportefrm' => array(
                            'label' => '<button class="btn btn-danger"><i class="icon-file"></i></button>',
                            'url' => 'Yii::app()->controller->createUrl("default/ReportFrmHistoria", array("id"=>$data->id))',
                            'imageUrl' => false,
                            'options' => array('title' => 'Reporte Formulario'),
                        )
                    ),
                    'htmlOptions'=>array(
                        'width'=>'125'
                    )
                ),
            ),
        )); ?>
    </div>
</div>